﻿using Prism.Mvvm;
using System.Windows;

namespace HlELock.Core
{
    public class DialogWindowViewModel : BindableBase
    {
        private static DialogWindowViewModel _instance;
        public static DialogWindowViewModel Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new DialogWindowViewModel();
                }
                return _instance;
            }
        }
        public DialogWindowViewModel()
        {
        }

        private bool _isBusy;
        public bool IsBusy
        {
            get { return _isBusy; }
            set { SetProperty(ref _isBusy, value); RaisePropertyChanged(nameof(Visib)); }
        }
        private string _descr;
        public string Descr
        {
            get { return _descr; }
            set { SetProperty(ref _descr, value); }
        }

        public Visibility Visib { get => _isBusy ? Visibility.Visible : Visibility.Collapsed; }
    }

}
